package com.gxa.hualian.common;

/**
 * 异常状态编码（code）和信息（message）枚举
 * @Author ChenJin
 * @date 2021/09/15 15:24
 **/
public enum ExceptionCode {

    // 枚举就说类型，枚举中的值先声明好，直接用
    // 枚举中同样可以声明字段/方法/bean方法/构造方法
    // 枚举中的值一般用全大写的英文单词组合
    SERVER_FAILED("50000","服务器开小差了，请稍后再试"),
    LOGIN_FAILED("50001","登录失败,请检查用户名或密码是否正确"),
    DUPLICATE_USERNAME("50002","重复的用户名"),
    NO_USER_EXISTS("50003","没有用户存在"),
    USER_WAS_NOT_FOUND("50004","该用户不存在"),
    PHONE_WAS_REG("50005","改电话已经注册过"),
    NO_COUPON("50006","暂无优惠券"),
    ADD_FAILED("50007","添加失败"),
    WRONG_PHONE_NUMBER("50008","不是一个有效的手机号"),
    SEND_SMS_FAILED("50009","发送短信失败，请稍后重试"),
    PHONE_HAS_REG("50010","该手机号已经注册过，请稍后重试"),
    WRONG_CAPTCHA_OR_PHONE("50011","手机号码或验证码错误"),
    WRONG_PHONE("50012","手机号码错误,请检查"),
    HAS_GET("50013","该优惠券已领取过"),
    HAS_NAME("50014","已经存在，请检查名字"),
    HAS_NONE("50015","空空如也"),
    POINT_ENO("50016","积分不足"),
    MGR_WAS_FROST("50017","改管理员已经冻结，请核查后登录");


    private String code;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ExceptionCode(String code, String message) {
        this.code = code;
        this.message = message;
    }


}
